package org.dromara.system.api.feign;

/**
 * @author: zhou shuai
 * @date: 2024/10/5 17:10
 * @version: v1
 */

import org.dromara.common.core.domain.R;
import org.dromara.system.api.domain.vo.RemoteClientVo;
import org.dromara.system.api.feign.fallback.SystemClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import static org.dromara.common.core.constant.ServerNameConstants.SYSTEM_SERVER_NAME;

@FeignClient(contextId = "system-client-api", name = SYSTEM_SERVER_NAME, fallbackFactory = SystemClientFallBack.class)
public interface SystemClientClient {

    /**
     * 根据客户端id获取客户端详情
     */
    @GetMapping(value = "/api/system/client/{clientId}")
    R<RemoteClientVo> queryByClientId(@PathVariable("clientId") String clientId);

}
